import hyRequest from '../../index'

// 查询所有监控项列表（主机下所有指标）
export function API_item_get(data?: any) {
  return hyRequest.post({
    data: {
      auth: 'b5e690f8c6b25e7898f26b2a7993901063615801c337ed2bad2850c4de0c552d',
      id: 1,
      jsonrpc: '2.0',
      method: 'item.get',
      ...data
    }
  })
}

// 监控项趋势
export function API_trend_get(data?: any) {
  return hyRequest.post({
    data: {
      auth: 'b5e690f8c6b25e7898f26b2a7993901063615801c337ed2bad2850c4de0c552d',
      id: 1,
      jsonrpc: '2.0',
      method: 'trend.get',
      ...data
    }
  })
}

// 检索历史数据
export function API_history_get(data?: any) {
  return hyRequest.post({
    data: {
      jsonrpc: '2.0',
      method: 'history.get',
      auth: 'b5e690f8c6b25e7898f26b2a7993901063615801c337ed2bad2850c4de0c552d',
      id: 1,
      ...data
    }
  })
}
